package model.resource;

import java.util.LinkedList;
import java.util.List;

public class RenewableResourceManager
{
	private List<RenewableResource> managerList;
	private int renewAmount;
	
	public RenewableResourceManager(int rate)
	{
		managerList = new LinkedList<RenewableResource>();
		renewAmount = rate;
	}
	
	public void addResource(RenewableResource r)
	{
		managerList.add(r);
	}
	
	public void update()
	{
		for (RenewableResource r : managerList)
		{
			r.addToQuantity(renewAmount);
		}
	}
}
